/*
 * Created on 2005-6-22
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
package apiwork.bean;

import com.linkage.util.log.Logger;
import com.opensymphony.xwork2.ActionContext;
/**
 * @author Lancelot
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 * All operation of get/set session, use this bean.
 */
public class ISessionBean {
	
	Object session = null;
	Logger log = Logger.getLogger(this.getClass());

	
	/**
	 * 
	 */
	public ISessionBean() throws Exception{
		init();
	}
	
	private void init() throws Exception{
		ActionContext actionContext = ActionContext.getContext();
		if(actionContext != null)
			session = actionContext.get(ActionContext.SESSION);
		else
			throw new Exception("not get ActionContext!");
	}
	
	public Object getSession() {
		return session;
	}

	public void setSession(Object session) {
		this.session = session;
	}
}
